import type { promises } from "dns"

export type TokenType = {
  aiSource?: string
  grantType?: string
  apiKey?: string
  secretKey?: string
}
export type AccessToken = {
  refresh_token?: string
  expires_in?: string | number
  session_key?: string
  access_token?: string
  scope?: string
  session_secret?: string
}
export type TokenState = TokenType &
  AccessToken & {
    createTime?: number | string
    tokenType?: TokenType
    accessToken?: AccessToken
  }
export type TokenStateObj = {
  token: AccessToken
  reqToken: TokenType
}
export type TokenAction = {
  setToken: (token: AccessToken) => void | Promise<void>
  setReqToken: (token: TokenType) => void
  dellAllToken: () => void
}
